<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:c="http://www.w3.org/1999/XSL/Transform">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
    <div th:replace="common/IncludeTop">
    </div>

    <div id="Content">
        <h2>My Orders</h2>

        <table>
            <tr>
                <th>Order ID</th>
                <th>Date</th>
                <th>Total Price</th>
            </tr>
            <tr th:each="order:${orderList}">
                <td>
                        <a th:href="@{'/order/viewOrder?orderId='+${order.orderId}}" th:text="${order.orderId}"></a>
                </td>
                <td th:text="${#dates.format(order.orderDate, 'yyyy-MM-dd HH:mm:ss')}"></td>
                <td th:text="'$' + ${order.totalPrice}"></td>
            </tr>
        </table>
    </div>

    <div th:replace="common/IncludeBottom">
    </div>
</body>
</html>